﻿using DevExpress.Mvvm.POCO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DevUIUtils.MVVM.BaseViewModels
{
    /// <summary>
    /// 对象编辑视图基类
    /// </summary>
    /// <typeparam name="T">编辑对象类型</typeparam>
    public abstract class BaseEditViewModel<T> : BaseDocumentViewModel
    {
        /// <summary>
        /// 窗体是否
        /// </summary>
        public virtual bool IsOK { get; set; } = false;

        /// <summary>
        /// 编辑后返回的对象
        /// </summary>
        public virtual T EditResult { get; set; } = default;
        protected virtual void OnEditResultChanged()
        {
            this.RaisePropertyChanged(x => x.EditResult);
        }
    }
}
